import { SchemaManageAPI } from '@/components/SchemaComponent/SchemaManage/type';

/** 专家库管理检索字段 */
export const getExpertsManageSearchColumns = ({
  educateLevelList,
  talentTitleList,
  overseasExperienceList,
  professionalList,
  cardTypeList,
  industryTypeList,
}: any): Array<SchemaManageAPI.ISearchList> => {
  return [
    {
      name: 'fullName',
      placeholder: '专家姓名',
      label: '专家姓名',
      componentType: 'Input',
      allowClear: true,
      md: 4,
      sm: 24,
      whetherSenior: false,
    },
    {
      name: 'companyName',
      placeholder: '所在单位',
      label: '所在单位',
      componentType: 'Input',
      allowClear: true,
      md: 4,
      sm: 24,
      whetherSenior: false,
    },
    {
      name: 'graduateMajor',
      placeholder: '研究方向',
      label: '研究方向',
      componentType: 'Input',
      allowClear: true,
      md: 4,
      sm: 24,
      whetherSenior: false,
    },
    {
      name: 'rankType',
      placeholder: '职称',
      label: '职称',
      componentType: 'Select',
      allowClear: true,
      md: 6,
      sm: 24,
      whetherSenior: false,
      dataSource: professionalList,
      mode: 'multiple',
      maxTagCount: 1,
      filterOption: (input, option) => {
        return (option?.children ?? '').toLowerCase().includes(input.toLowerCase());
      },
    },
    {
      name: 'industryType',
      placeholder: '从事专业',
      label: '从事专业',
      componentType: 'Select',
      allowClear: true,
      md: 6,
      sm: 24,
      whetherSenior: false,
      dataSource: industryTypeList,
      mode: 'multiple',
      maxTagCount: 1,
      // showSearch: true,
      filterOption: (input, option) => {
        return (option?.children ?? '').toLowerCase().includes(input.toLowerCase());
      },
    },
    // ============================更多==============================
    {
      name: 'phoneMobile',
      placeholder: '联系电话',
      label: '联系电话',
      componentType: 'Input',
      allowClear: true,
      md: 4,
      sm: 24,
      whetherSenior: true,
    },
    {
      name: 'projectReview',
      placeholder: '实验室项目评审经历',
      label: '实验室项目评审经历',
      componentType: 'Input',
      allowClear: true,
      md: 4,
      sm: 24,
      whetherSenior: true,
    },
    {
      name: 'educateLevel',
      placeholder: '最高学历',
      label: '最高学历',
      componentType: 'Select',
      allowClear: true,
      md: 4,
      sm: 24,
      whetherSenior: true,
      dataSource: educateLevelList,
    },
    {
      name: 'graduateSchool',
      placeholder: '毕业院校',
      label: '毕业院校',
      componentType: 'Input',
      allowClear: true,
      md: 4,
      sm: 24,
      whetherSenior: true,
    },
    {
      name: 'graduateMajor',
      placeholder: '研究方向',
      label: '研究方向',
      componentType: 'Input',
      allowClear: true,
      md: 4,
      sm: 24,
      whetherSenior: true,
    },
    {
      name: 'talentType',
      placeholder: '人才称号',
      label: '人才称号',
      componentType: 'Select',
      allowClear: true,
      md: 4,
      sm: 24,
      whetherSenior: true,
      dataSource: talentTitleList,
      mode: 'multiple',
      maxTagCount: 1,
    },
    {
      name: 'overseaType',
      placeholder: '海外经历',
      label: '海外经历',
      componentType: 'Select',
      allowClear: true,
      md: 4,
      sm: 24,
      whetherSenior: true,
      dataSource: overseasExperienceList,
      mode: 'multiple',
      maxTagCount: 2,
    },
    {
      name: 'cardType',
      placeholder: '证件类型',
      label: '证件类型',
      componentType: 'Select',
      allowClear: true,
      md: 4,
      sm: 24,
      whetherSenior: true,
      dataSource: cardTypeList,
    },
    {
      name: 'cardNum',
      placeholder: '证件号码',
      label: '证件号码',
      componentType: 'Input',
      allowClear: true,
      md: 4,
      sm: 24,
      whetherSenior: true,
    },
    {
      name: 'bankName',
      placeholder: '开户行名称',
      label: '开户行名称',
      componentType: 'Input',
      allowClear: true,
      md: 4,
      sm: 24,
      whetherSenior: true,
    },
    {
      name: 'bankNum',
      placeholder: '银行账户',
      label: '银行账户',
      componentType: 'Input',
      allowClear: true,
      md: 4,
      sm: 24,
      whetherSenior: true,
    },
    {
      name: 'emailNum',
      placeholder: '邮箱',
      label: '邮箱',
      componentType: 'Input',
      allowClear: true,
      md: 4,
      sm: 24,
      whetherSenior: true,
    },
    {
      name: 'addressInfo',
      placeholder: '所在地',
      label: '所在地',
      componentType: 'Input',
      allowClear: true,
      md: 4,
      sm: 24,
      whetherSenior: true,
    },
  ];
};
// {
//   name: 'belongArea',
//   placeholder: '所在地',
//   label: '所在地',
//   componentType: 'Cascader',
//   dataSource: areaListData,
//   allowClear: true,
//   md: 4,
//   sm: 24,
//   whetherSenior: true,
// },
// {
//   name: 'industryType',
//   placeholder: '从事专业',
//   label: '从事专业',
//   componentType: 'Select',
//   allowClear: true,
//   md: 4,
//   sm: 24,
//   whetherSenior: true,
//   dataSource: industryTypeList,
//   mode: 'multiple',
//   maxTagCount: 2,
// },
// {
//   name: 'sex',
//   placeholder: '性别',
//   label: '性别',
//   componentType: 'Select',
//   allowClear: true,
//   md: 4,
//   sm: 24,
//   whetherSenior: true,
//   dataSource: [
//     {
//       name: '未知',
//       value: '0',
//     },
//     {
//       name: '先生',
//       value: '1',
//     },
//     {
//       name: '女士',
//       value: '2',
//     },
//   ],
// },
// {
//   name: 'createFormName',
//   placeholder: '创建',
//   label: '创建',
//   componentType: 'DeptAndUser',
//   dataSource: orgDeptList,
//   allowClear: true,
//   md: 6,
//   sm: 24,
//   whetherSenior: true,
//   formOrgType: {
//     COMP: 'createCompanyID',
//     DEPT: 'createDepartmentID',
//     POS: 'createPositionID',
//     USER: 'createrID',
//   }, //获取组织机构表单name, componentType: 'DeptAndUser', 必传
// },
// {
//   name: 'createTime',
//   placeholder: '创建时间',
//   label: '创建时间',
//   componentType: 'RangePicker',
//   allowClear: true,
//   md: 6,
//   sm: 24,
//   whetherSenior: true,
// },
// {
//   name: 'expertType',
//   placeholder: '专家类型',
//   label: '专家类型',
//   componentType: 'Select',
//   allowClear: true,
//   md: 4,
//   sm: 24,
//   whetherSenior: false,
//   dataSource: expertsTypeList,
// },
// {
//   name: 'expertLevel',
//   placeholder: '专家级别',
//   label: '专家级别',
//   componentType: 'Select',
//   allowClear: true,
//   md: 4,
//   sm: 24,
//   whetherSenior: false,
//   dataSource: expertLevelList,
// },
// {
//   name: 'isDuty',
//   placeholder: '是否在岗',
//   label: '是否在岗',
//   componentType: 'Select',
//   allowClear: true,
//   md: 4,
//   sm: 24,
//   whetherSenior: false,
//   dataSource: [
//     {
//       name: '否',
//       value: '0',
//     },
//     {
//       name: '是',
//       value: '1',
//     },
//   ],
// },
// {
//   name: 'nationType',
//   placeholder: '民族',
//   label: '民族',
//   componentType: 'Select',
//   allowClear: true,
//   md: 4,
//   sm: 24,
//   whetherSenior: true,
//   dataSource: antionTypeList,
// },
